package com.pro.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration  //applicationContext.xml
public class PubConfig {
    //通过Bean在spring容器中创建一个对象
    @Bean
    public Queue queue(){
        return new Queue("pub-yanzhengma");
    }
}
